read_environment_variable

This function reads the value of a user specific or system wide environment variable.

string read_environment_variable(string name)

Parameters:
name
The name of the environment variable to read.

Return value:
A string containing the retrieved value on success, or an empty string on failure.

Remarks:
Environment variables are pieces of information that are either related to the operating system or to the current user. This function can retrieve both types.

The environment variable names are not case sensitive.

Example:
// Try to retrieve some information about the processor.

void main()
{
string value=read_environment_variable("PROCESSOR_IDENTIFIER");
if(get_last_error()!=0)
{
alert("Error", get_last_error_text());
exit();
}
alert("Value", value);
}